import React from 'react'
import { Navigate } from 'react-router-dom'
// 高阶组件导航首位
function Hoc_login(Com) {
    return function fun() {
        let token = localStorage.getItem('token')
        if (token) {
            return <Com></Com>
        } else {
            return <Navigate to='*'></Navigate>
        }
    }
}

export default Hoc_login
